package com.htjc.integral.account.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.htjc.integral.account.service.IRedPacketCarouselService;
import com.htjc.integral.common.annotation.ExecuteTime;
import com.htjc.integral.common.annotation.InvokeLog;

import lombok.extern.slf4j.Slf4j;

@Slf4j(topic = "exchangeLogger")
@RestController
//@RequestMapping(value = "/co/redPacket")
@RequestMapping(value = "/ac/redPacket")
//@RequestMapping(value = "/jf_exchange/redPacket")
public class RedPacketCarouselController {

	@Autowired
	private IRedPacketCarouselService iRedPacketCarouselService;

	/**
	 * 红包轮播图接口
	 * 
	 * @param json
	 * @return json
	 */
	@InvokeLog(value="红包轮播图查询",params={})
	@RequestMapping(value = { "/redPacketCarousel" }, produces = {"text/json;charset=UTF-8;", "application/json;"})
	public String redPacketCarousel(@RequestBody String params) {
		JSONObject json = JSON.parseObject(params);
		return iRedPacketCarouselService.redPacketCarousel(json).toJSONString();
	}

}
